using System.Net;

namespace Comms {
    public class PeerData {
        public double LastKeepAliveReceiveTime;

        public double NextKeepAliveSendTime;

        public Peer Owner { get; set; }

        public IPEndPoint Address { get; set; }

        public float Ping { get; set; }

        public object Tag { get; set; }

        public PeerData(Peer owner, IPEndPoint address) {
            Owner = owner;
            Address = address;
            LastKeepAliveReceiveTime = Comm.GetTime();
            NextKeepAliveSendTime = LastKeepAliveReceiveTime + owner.Settings.KeepAlivePeriod;
        }
    }
}